export {};

const arr = [1, 2, 3, 5, '123'];

const num: any = arr.find(i => i > 0);

// 此时需要断言
// const res = num * num;

// 断言1 as 关键字 （推荐）
const res = (num as number) * (num as number);

// 断言2 <> 语法 (不推荐，因为可能会与 jsx 语法冲突)
const res2 = (<number>num) * (<number>num);